#pragma once

#include "TinyMsg.h"

#include <log4cxx/logger.h>
#include <log4cxx/PropertyConfigurator.h>
#include <fstream>
using namespace log4cxx;
using namespace TinyCC::msg;

enum ENUM_LOGLEVLE
{
	debug1,
	debug2,
	info,
	error,
	fatal
};

class CTinyLogger
{
public:
	CTinyLogger(void);
	virtual ~CTinyLogger(void);
public:
	void selectlogType(std::string type);
	void log(ENUM_LOGLEVLE level,std::string log );
	void log(ENUM_LOGLEVLE level,CTinyMsg& msg);
private:
	std::ofstream	m_logHandle;
	LoggerPtr m_logger;
};
